package io.github.cocoa.module.socket.api.sample;

import io.github.cocoa.framework.common.pojo.CommonResult;
import io.github.cocoa.module.socket.api.sample.dto.SampleInfoRespDTO;
import io.github.cocoa.module.socket.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * RPC 服务 - 示例信息
 *
 * @author James
 */
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 示例信息")
public interface SampleInfoApi {
    String PREFIX = ApiConstants.PREFIX + "/sample/info";

    @GetMapping(PREFIX + "/get")
    @Operation(summary = "获得示例信息")
    @Parameter(name = "id", description = "编号", required = true, example = "1")
    CommonResult<SampleInfoRespDTO> getUser(@RequestParam("id") Long id);

}
